all itests pass now with refactored code