using element in constructor instead of holding onto 'panel' from Mike's review