adding extend function
Merge branch 'master' of https://github.com/hendychua/3213-hw4