added the code for check if positive function but still code not tested