fixed minor error in forcing function, added optional output