add side-effect detection