suggested syntax gives compiler warnings