add sync in logining, patient selection