refactored room API