Simplifying trials array using .push() in script.js