for and function added