working version with metrix
two copies, broken