hist load function