#7 checking for permissions and added caption