refactored
unused variable editor removed
add prenthesis back where removed
Merge pull request #114 from ysksn/master

re-factoring