First Try for coursera assignment