Continued work on adopt function