Adding function to detect browser width