adjusted script to remove legend border