Adding print function working properly