changed print function signature and added include files to get rid of warnings