changed some functions to more apporpriate names