several additions + fixed several critical errors

new methods, fixed other methods, new unit tests and cases