moved some test code around.
Bug in code with changed API.