extract functions to make code readible