added casting max results to int