adding tests and solving image recovering version issue