implemented an attr method.
added a new test for a view.