got legend up using sample code, but everything is messy code and design wise.