connecting to the database

Finally debugged the assignment so now it is connecting to the database