improvement according to comments