some Code impovements