Final version for assignment