Added API for modcode