memory leak updates with protocol - needs work still