implemented getLastImage