implemented auto upload photos function, but not finished yet