Added last part of showimage function