Added controller functions for matching