minor refactoring on the fe