added functionality for using saved models