collect => collect! and use constant for query

collect => collect! and query in constant