adding add/mod/sub api and alloc context during add and release context while processing subtract code