Method of manufacturing an electronic device