refactored file input & added sessionStorage