added constructor to editor