refactor addon