UV light controlled optoelectronic memory based on WSe2 and hBN encapsulated graphene heterostructures