Initialize loop using new API
Merge pull request #1 from saghul/loop_init

Initialize loop using new API