add position queue code
add directives