add method for serialize on collection query