code button also logs code in console