improved legend