moved the loop to haml