generate gem structure