add sample optimisation methods that seem to work reasonably well