bug fixes and uncomment testing lines