modified domain to include n in output