subdivision function written