add code for safe