corrected to gendarme warnings as noted