added virtual print function