moved gen method into interface
refactored commgen