added after hooks to api