print function working