Use higher order functions to reduce code repetition in some methods