improve testcase; integrate classes