moved legend to the top