adding functions and initializations