updated code
minor changes