added population code and fixed bug in drop table statments when table didnt exist