made more adjustments to allow reuse