added methods to remove the loop to