updated 'matches' to 'has' and cleanup other stuff