adding assignment on changing routes