Merge pull request #608 from JessonChan/develop

refactor func