I don't like how this is done nor the comparePhoto function ...