Final version for assignment#2