made changes to 4th and 5th methods