added continuous mode