implemented extend behavior in Class