adding naive implementation