log function added