still some problems with the match cases. Blargh