make code less monolithic