some refaktorings