Made orig() run only once as pointed out by @yegle