Distance determination to 12 type II supernovae using the expanding photosphere method