Added possible-rewrites external to test rewrites and returns a string containing the successfull ones