move Room functions to prototype