Adapted to new structure, added enum to sample