Added generation functionality