modified generator to try to systemetize printing