updated viewport width code