cleaned up select and insert, started join