memory management for free retations added