Some fixing, and added method extend