update practice() function