Place function match() to correct place