Issue #12 - added attr function but it still needs to be tested.