I'm not quite grasping your meaning here. Should I change these functions to just return opening (0), closing (1), or neither (-1)? I didn't make the top one, I only added the other as the top function doesn't provide me with what I need