Initial version of complete() function