Fixed #18, updated method extend class