perodic b.c. working