works reasonably, time to cleanup
working demo