add populate function