organized rsi code better