Added basic internal functional loop