Added functions to fetch data (as of now not used PDO)