Study of controlled release of active pharmaceutical ingredients from functionalized nanoclays and polymer matrices