added populate function