export stage finalization and build_model function done
add triggers, and caching of last model key