Added data class and a legend