added legend to endpoints histogram