rearrange the functions to make it easier to read