modified population script