implemented custom memory management