implement directive for cost