refactor struct for holding outputs