Implemented previous commit for all functions.