replace eval by call to get_api