updated callback names
updated with better syntax for querying documents