add retrieval of start and stop
added query retreival + debuggin messages