fixed the eval function