added populate-tables code.