removed unnecessary multiple printf calls, better string formatting