removing $config as argument in constructor