Added more functions and events