Added function, variables and notes