working on varaible period