impls oscillate function