draw legend implemented