data class and classifyData code from library used in trial1