added typed query with criteria query