converted isotope functions to a directive