Using module.exports to allow the function to be exported