code cleanup
comments added