added fast return, if m or n < 1