Setting up print function