load function before prompt