cleanup add method for json version