implement basic print function