finished implementation of match adding