let function for all browsers