added legend to footer