added support for Scala Case classes