added method for checking linear dependence