implemented complet.R