removed log function