worked on updating the sql + getting the pages towork with the new sql