ADDED MAIN.R. must still debug
think no bugs. run from main.R now