converted insert try catch block to insertContent() function and did the same for the select content try catch block