updated code cleaning