cleaning up getOutput function in FLC