better, but still work-in-progress