refactored code to allow any 2 numbers to be put in when instantiating