finalized programiming assignment