added permissions and a swipeleft handler