refactor hotel.js