updating relations