console printout for function