modification following as ken's comments