Changed the places of variables and corresponding images