more work & bug fixes