mode class compiles but is unused
using mode class all over