renamed functions to better names