refactored to more meaningful names. More refactoring is needed.