naive implementation + test