[task] Add construct and destruct function