adds enter functionality