ecomfe/edp#181
optimize code
Merge pull request #13 from ielgnaw/master

ecomfe/edp#181