fixing route api and connect db