added model loading functions.