fixed the method to find ways