populate student function