adding function for adopting states
adding extension handling