updated mini assignment with population check.