Add basic format and query function