refactored augment function, less code