optimised performance

now runs in realtime on my lowly macbook air