simplified main functions