some small changes to the cud and model to try to improve sweetalert functionality