not sure why my function isn't being called