Updated eval function