V2

Update unit test + refactor source code