refactor some code
refactor cide