improved prompt()
added global