did some refractoring