Added attribute function with testcases
Merge PR #138 and rebuild