added basic functions
fixed space added to key