Added support for input for baords of different sizes