david correcting the output