update code after recommendation