added module.exports and ensured tests still work