add handler with query attributes