Binary Period Algorithm added.