Overall function through event