add test and ensure safety