removed a lot of prints and added onclick to a button