slight modification on checking the permission