removed "discards ‘const’ qualifier" warnings