def _bottom_neighbor(site, x_dimension, y_dimension, periodic):
    if y_dimension == 1:
        return None
    if site + x_dimension + 1 > x_dimension*y_dimension:
        if periodic:
            return site + x_dimension - x_dimension*y_dimension
        else:
            return None
    return site + x_dimension