Changed fat arrow functions to regular functions