a bit of reworking