setup prototype chain properly