clean code and add results for B=5000