Added code to record completions