separating functionality into distinct modules