First commit of the function to obtain population