added buttons to switch between bezier and bar