made a proper code
merged master branch