some various utility stuff