generate shared
 remove uncessary code