finalised manual implementation + metrics