-Added helper function for output population