Added move function, isValidPosForSize