some superficial changes by Janis