add loadimage code