fix classpath
added tests (not checked)