Added code for computing ResultNumber