implements correct redirection when modifying data