rebuild some code and change the direciton of the images