Made the Ans function work a little better