added API for querying