implemented add photo functionality