refactor of gem prefab