changes for better safe range generation