added functions to speed up prompt