simplified main file with includes and modified elas trimming