add support for variable spans