refactoring code 2014.11.29
refactoring complete