added some util stuff for my tickets #220 #190