fixed #8
removed unnecessary variable
fixed #10