* Refactoring the part of checking next position of the blocks