Using less elegant JS that was working on my local box