Using match in canvas