organizing the code

minor changes