added removeAttr function and tests for attr