some style and code enhancments