changed attr method calls to use prop instead. fixes #1