moved restrict qualifiers to please more compilers