Added prepared statments and connected to stored procedure