added circle legend, many other fixes