refactor + bugifx & code format