works in firefox except for loops