working to generalize for reuse