Corrected functions

Corrected functions