added a console.log to check if everything's working properly