added directed functionality
added directionality in graph