modify main function to accept parameters and tunes some parameters in LAOF