defined functions and they work