start abstracting common functionality into modules