refactor some and add some