Exported the subScript function