renamed functions to make more sense