probably super wrong but doesn't give random memory issues anymore