cleaned up onMessage