add basic conditions and some unit tests, nuget package restore