Added params to constructor and initialised variables