naive implementation & runtime measurement