reducing num < 5 call to just happen once