removing the redundancy and cleaning some whitespace
speed
changes
took tamas changes