put all the is_whole functionaility into the is_whole function