refactor fb utils