changed FS and BS to be sets rather than arrays
added tests for BS and FS