added some resource utilities (will be external later)