added permissions, debugging