return nil instead of breaking the loop