update main to use variables