For final assignment for coursera