adding test code refs #374