Implement the loop attribute