added more unit tests and fixed some default value bugs