added phi generator