toArray method
now the method listen can handle multiple notifications