got the directive working