cleaning up formatting buttons click handler