Added a few function definitions