Added function to pre-populate localStorage