added sanitize funciton to make nullify work