trying to get legend