A methodology for procedure cloning