updated code and tests
Merge pull request #1 from nadavmatalon/jas

updated code and tests