adding async behaviour to conditional logic
resolve #287