use core.match to clean up the fs example