adapted to more stringent naming in mysql