working on the mirror code