new fba code and some testing