Added naive implementation (was faster than bmh?)