further API development, added criteria query