Added permissions and modified ThirdActivity