Added lib and test case
Test is more meaningful now