updated with template binding trick learned while making toolbar