further updates made according to zalun comments