Added function definitions for fix