small changes to make the function testable
small changes to make the function testable

sexybiggetje/ifme,HashNotAdam/ifme,kkelleey/ifme,HashNotAdam/ifme,julianguyen/ifme,sexybiggetje/ifme,cartothemax/ifme,kkelleey/ifme,sexybiggetje/ifme,HashNotAdam/ifme,kkelleey/ifme,julianguyen/ifme,julianguyen/ifme,julianguyen/ifme,cartothemax/ifme,cartothemax/ifme,cartothemax/ifme