added graph cut and unit-test

Do add comments even for private functions