added definitions for querying and insertions
additional test cases and endpoint queries implemented