changed some function names for readability