moved initializations to constructor