redesign toggle and text preference with OOP