separated code from IIF repository