Revised arct function