implement different modes