Updated for api rest