fixing sign_enumeration and explore functions
- making sure parameters are passed by reference
- Fixing traversal and logic