splitting modes into separate classes
splitting modes into separate classes