fixing implemenation