create some helper functions, add 2nd example