Replace print keyword with function