refactored hotels.js