trying to fix calculator so it works on jsfiddle