a couple more useful functions