used initilization lists to compact code by around 10 lines