added more functionality to data class