minor modifications for language independence