some changes and functions