minor code cleanup
added generic test using intern