adding printing logs, changing every system.out.println to proper print.