Converting a traditional function to an arrow function