update description and refactor code