use localStorage to boost performance