included try and catch blocks in the sql methods so they no longer throw exceptions