added single mode. Needs a rewrite bad