start fixing memleak