further simplified main