Validation changed
ticket3: added tests for validation
ticket4: merging fixes from ticket3