Buff changes

improved buff code to prepare for synchronization later