do some refactors