a cleaner example for functions