various messy testing codes