use bar to control the length of links