using class attribute to determine directedness