implemented api.eval()