remove function for testing nested term