addition of permissions check
remove permissions check and just keep cleanup