implement init function and print function