more methods from chapter 5
further changes