correction to population function and other changes
edit