take out unit function printing in outer functions