almost there, got the 2 modes partially working