How to know entry and exit points