added loop run capability