added select and execute functions to db class