adjust raii class naming
cleaner flow control, better memory management