added ability to use gallery pictures