print function works just like printf does