Added basic loop function to world