add some methods into second homework