trying to tidy up this mess...