adding multi-scop support