Changes made to the directive to make it compatible to all kinds of data