adding permissions and device feature check