added InvalidArgumentException
fixed validation bug
removed
finished unit tests