updated names, code style, etc.