improve: refactor inner structure