adding piranha func and fixing internal data checks and executable checks