bug fixes and added units