check direction