adding validation for tile dimensions and added more unit tests