fixed expand / collapse issue
changes to api and view