fix enter, format code and add name functionality