my code for coursera machine learning class by AndrewNG