now with history and spacebar action