more robust approach