adding repeat and stop option small improvements are required on execution