adding some refactor