api routes working. going to merge with master