move suppress warnings statement to where it's needed