switched from using spring to constructors