added functionality for weighted graphs with orca