Solution for qunar exercise