add basic match function