Added some functions related to controllability.py