I would suggest to extract the logic out of constructor.