refactor right