Added enter of data
small optimization of code