added direction check