Added Functionality in the events handlers