working on basic functions that will use active record style queries