formatting and redundancy removal 2