added a params object as variable

trying to learn the proper pattern in JS