added direction attribute