renamed a couple of methods to make it more readable