refactored script view