bug fixes and started test