homework #6 for GeekHub JS Group