extracting method for reusage
implementing event handling logic.