update some code for user template