better legend interaction