seperated population script to handlers + minimized population function for readability