added imName as param, switched code to editor