changed some function names to be more meaningful