Implemeted States and Query Builder