can extend js constructors