returned essential code accidentally removed in last fix