functions and different ways of passing variables to functions