continue to refactor code style and functions