rewriting home controller