Simple for loop implementation, fixes #87