added scratch functionality