wip: rejigger logic