removing the redundancy and cleaning some whitespace