updated to work with new flexo api