some small changes
seems like an infinite loop!