harmless(?) but big refactoring