some missing functions, and remove unnecessary printing to screen.