replace printf with functions from print.h to save some space