take care of loops in a half-assed manner