fixed bug where I was incorrectly init the output object