improve installation function.