boxes creation recursively