make grace period a command line parameter