Removed useless weird code.
Added loop.