added if name == main loop at end of script.