add direction code