added some controls, degraded performance a bit