Better functions in prompt helper