adding case classes support