fixed views and added app logic