mostly working picture loop