add getPictures function for issue #11