smoothed line, added rectangle capability