My solution to the homework of classes in coursera