I want to do away with var button and autorun the function such that i do not reuire a button click to run it