added Danny's suggestions