add support for different prioritys and scheduling policies
-break big envlock to make upper changes have an effect