What does this code do? It looks really weird.