(does not yet work) do not depend any more on code copied from sprinter