Is it ok to have the loop in here? Should I be doing something fancier?