Using compile to repeat