remove puts and redundant return