helper utilities and random code for rrrrrrrr