added testcode.