refactored add view to use script section.