fixed mock implementation