adding populate method to support ajax
adding localstorage
adding persistance layer