add pattern match to use smaller format