updatig output and fixing