added legend stuff
legend/checkbox disabling stuff