now this reproduces all the old functions