Adding prototype to support events