removed log function to save RAM