update assets
refactor code