refactor. easier to read.