Fix and add

Fixed the error at line 30 and added the ranTotal console print