Working Version. Work on output