add try_remove with unittest
Merge pull request #576 from stdweird/variables_change

add try_remove with unittest