Expose critical sections api and add section id param for generalization