fixes #159 and lays the ground for more things