fixed order of images, added functions for plotting and mse calculation