removed unnecessary preventdefaults and console.logs