Moved loops over to context but something is off