refactored everything to rx