added before and after instead of n