renamed a few functions to make sense