needs to rework to prevent leaks