some changes for performance