reworked model + thrift classes