loops bug fix, api for 0.0.4