changed print function