added some legend stuff, commented out, revisit later