initial work for user completions
fix logic bug