minor optimizations for demo project