Added the possibility to query with attributes