added a simple loop