Added spacebar functionality