recursive version - can not pass 50X5 board test case