Final submitted code