added specs and implemented voted method and view