added missing functions
Added missing functions and explanations