renamed functions to be more clear