added save function, temporarily triggered with [SPACE] key