adds second view and make use of js objects