raw SQL was annoying me so starting to port stuff completely over to SQLalchemy