enter function