Edit1

Fixed looping eror and the whole code