naive implementation complete