directive prototype working