Fixed ranges and domain.
Added run in tests