refined drawing controller buttons code