Put answer population in a function