fixed control logic
cleaned println functions