Changed name of main to record