organised the constructor a little