added in safety wrapper
merged conflicts
removed unnecessary fn