made printer parameter optional and added coloring in terminal