implementing implant method and adding tests