started working on moving sql query's