add code and complexity
edit tests