fixed issues and set up test