Working string compare and sample