Adds a weighted directions fn.