module.exports moved to the top