functions accept table as parameter
events handle looping
variable scope encapsulated with a function execution