Adding backspace to the loops