cleanup printing and remove redundant information