changed layout  and bugfix
written testcode of view , and bug fix