checking complexity