both function added