code refactoring
Merge pull request #5 from nadavmatalon/refactor

code refactoring