refactored a couple lines of code.