avoiding zombies and writing helpers and stuff