made some changes to the process according in and out