some changes and checks