less relative matrix update, refactoring