some refactoru