redundant puts removal