refactored when to apply fx