added tests, fixed wrong parameters parsing