improving the program with BSB