my source code in 2 years.. learning algorithm ^_^